package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.Info;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 新闻Mapper接口
 * 
 * @author ruoyi
 * @date 2022-12-02
 */
public interface InfoMapper 
{
    /**
     * 查询新闻
     * 
     * @param infoid 新闻主键
     * @return 新闻
     */
    public Info selectInfoByInfoid(String infoid);

    List<Map<String, Object>> findByCategoryIdPaging(@Param("categoryid") String ppCategoryId,@Param("infotitle") String ppInfotitle,@Param("deptid") String deptid,
                                                     @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    Object countByCategoryIdPaging(@Param("categoryid")String ppCategoryId,@Param("infotitle") String ppInfotitle,@Param("deptid") String deptid);

    Object getMaxOrdernum(@Param("categoryid")String ppCategoryId);

    List<Map<String, Object>> isZhiding(@Param("infoid")String ppInfoId);
    List<Map<String, Object>> findPassedByCategoryIdPaging(@Param("14tian") String pp14tian,@Param("categoryid") String ppCategoryId,@Param("infotitle") String ppInfotitle,
                                                           @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findSYPassedByCategoryIdPaging(@Param("14tian") String pp14tian,@Param("categoryid") String ppCategoryId,@Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPassedBySJCategoryId(@Param("14tian") String pp14tian,@Param("categoryid") String ppCategoryId);

    List<Map<String, Object>> findPassedByCategoryIdAndTitlePaging(@Param("14tian") String pp14tian,@Param("infotitle") String ppInfotitle,
                                                           @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> jiansuoInfo(@Param("shijian") String ppShijian,@Param("fanwei") String ppFanwei,@Param("neirong") String ppNeirong,@Param("shifouxuanzelanmu") String ppshifouxuanzelanmu,@Param("categoryidlist") List<String> ppCategoryidlist,@Param("qi") String ppQi,@Param("zhi") String ppZhi,
                                          @Param("paixu") String ppPaixu,@Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    Object countJiansuoInfo(@Param("shijian") String ppShijian,@Param("fanwei") String ppFanwei,@Param("neirong") String ppNeirong,@Param("shifouxuanzelanmu") String ppshifouxuanzelanmu,@Param("categoryidlist") List<String> ppCategoryidlist,@Param("qi") String ppQi,@Param("zhi") String ppZhi);

    Object countPassedByCategoryIdAndTitlePaging(@Param("infotitle")String ppInfotitle);

    Object countZhidingxinwen(@Param("categoryid")String ppCategoryId);

    List<Map<String, Object>> findByCategoryId(@Param("14tian") String pp14tian,@Param("categoryid") String ppCategoryId);

    Object countPassedByCategoryIdPaging(@Param("categoryid")String ppCategoryId,@Param("infotitle") String ppInfotitle);

    List<Map<String, Object>> findPassedByCategoryIdAndDeptidPaging(@Param("14tian") String pp14tian,@Param("categoryid") String ppCategoryId,@Param("deptids") List<String> ppDeptid,
                                                           @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);

    Object countPassedByCategoryIdAndDeptIdPaging(@Param("categoryid")String ppCategoryId,@Param("deptids") List<String> ppDeptid);


    Map<String, Object>findCustomOne(@Param("infoid")String ppInfoId);

    Map<String, Object>findOneInfo(@Param("infoid") String ppInfoId,@Param("categoryid") String ppCategoryId);

    /**
     * 查询新闻列表
     * 
     * @param info 新闻
     * @return 新闻集合
     */
    public List<Info> selectInfoList(Info info);

    /**
     * 新增新闻
     * 
     * @param info 新闻
     * @return 结果
     */
    public int insertInfo(Info info);

    /**
     * 修改新闻
     * 
     * @param info 新闻
     * @return 结果
     */
    public int updateInfo(Info info);

    /**
     * 删除新闻
     * 
     * @param infoid 新闻主键
     * @return 结果
     */
    public int deleteInfoByInfoid(String infoid);

    /**
     * 批量删除新闻
     * 
     * @param infoids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInfoByInfoids(String[] infoids);
}
